﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX.Direct2D1;

namespace SFSpacefight
{
	public class MenuNew : Screen
	{
		public MenuNew(RenderTarget target)
			: base(target)
		{
			objects.Add(new Button(target, "Start", Game.width - 200, Game.height - 100, 200, 25));
			objects.Add(new Button(target, "Back", 0, Game.height - 100, 200, 25));
			objects.Add(new ChooserBox(target, "Choose Ship", 200, 200, Game.width - 400, Game.height - 400));
			objects.Add(new Button(target, "<", 200, 200, 100, Game.height - 400));
			objects.Add(new Button(target, ">", Game.width - 300, 200, 100, Game.height - 400));
		}
		public override GameState Loop(int mousex, int mousey, bool clicked)
		{
			GameState returnstate = base.Loop(mousex, mousey, clicked);

			if (returnstate == GameState.None)
				for (int i = 0; i < objects.Count; i++)
				{
					if (objects[i].Loop(mousex, mousey, clicked) == GameState.ButtonClicked)
					{
						switch (i)
						{
							case 0 : //start
								break;
							case 1: //back
								regresscountdown = transitionframes;
								nextscreen = new MenuMain(mytarget);
								break;
						}
					}
				}

			return returnstate;
		}
	}
}
